package com.geekbang.boot.demo1;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author nhsoft.lul
 */
public class Demo1Application {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("demo1ApplicationContext.xml");
        Demo1Student student = (Demo1Student) context.getBean("student");
        System.out.println(student.toString());

        Demo1Student student1 = context.getBean(Demo1Student.class);
        System.out.println(student1.toString());
    }
}
